﻿using Microsoft.EntityFrameworkCore;
using moc.IDAL;
using System;
using System.Collections.Generic;
using System.Text;

namespace moc.DAL
{
    public class UnitOfWork<TDbContext> : IUnitOfWork where TDbContext : DbContext
    {
        private readonly TDbContext _dbContext;
        public UnitOfWork(TDbContext context)
        {
            _dbContext = context;
        }
          
        public int SaveChanges()
        {
            return _dbContext.SaveChanges();
        }
    }
}
